<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html">
<h:head>
    <title>#{msg.page_authorization}</title>
    <h:outputStylesheet library="css" name="style.css"/>
    <h:outputScript library="js" name="login.js"/>

</h:head>
<h:body>
    <div class="center">
        <div style="text-align:right;">
        </div>
        <div class="text">#{msg.page_authorization} :</div>
        <h:form>
            <h:commandButton value="User" action="#{loginBean.doLoginUser}"/>
            <h:commandButton value="Admin" action="#{loginBean.doLoginAdmin}"/> <br/>

        </h:form>
        <h:form id="register">
            <!--<h:message for="LoginGroupPane" style="color:red;" />-->

            <h:panelGrid  id="LoginGroupPane" rendered="#{!registration.codeSent}">

                <h:outputLabel for="login" value="#{msg.text_login} : " />
                <h:inputText id="login" value="#{loginBean.login}" required="true"
                             requiredMessage="#{msg.text_enterLogin}"
                        />
                <h:message for="login" style="color: red;" />
                <h:outputLabel for="pass" value="#{msg.text_login} : " />
                <h:inputText id="pass" value="#{loginBean.pass}" required="true"
                             requiredMessage="#{msg.text_enterPass}"
                        />
                <h:message for="pass" style="color: red;" />

            </h:panelGrid>
            <h:commandButton  value="#{msg.page_authorization}" action="#{loginBean.doLogin}" onclick="loginUser(this.form)"/>
            <br/>
            <h:commandLink value="#{msg.page_reg}" action="/login/registration" immediate="true"/>
            <h:commandButton value="#{msg.page_index}" action="/index" immediate="true"/>

        </h:form>
    </div>
<!---->

</h:body>
</html>


